package app.android.com.wuandroidapp.test.model.repository;

import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;


import app.android.com.wuandroidapp.AndroidApplication;
import app.android.com.wuandroidapp.test.model.db.entities.minimalist.Weather;
import rx.Observable;
import rx.Subscriber;

/**
 * @author baronzhang (baron[dot]zhanglei[at]gmail[dot]com ==>> baronzhang.com)
 *         2016/12/10
 */
public class WeatherDataRepository {

    public static Observable<Weather> getWeather(Context context) {

        //从数据库获取天气数据
        Observable<Weather> observableForGetWeatherFromDB = Observable.create(new Observable.OnSubscribe<Weather>() {
            @Override
            public void call(Subscriber<? super Weather> subscriber) {
                    Weather weather = new Weather();
                    weather.setCityName("战丶灭天");
                    subscriber.onNext(weather);
                    subscriber.onCompleted();
            }
        });


        return observableForGetWeatherFromDB;
    }


}
